Class HostPortImpl

All Implemented Interfaces:
IPCObject, HostPort, Port, Process
Direct Known Subclasses:
RouterPortImpl

public class HostPortImpl extends PortImpl implements HostPort
Information provided by the PKI file:

    \class HostPort
    
    \brief HostPort handles and manipulates the port configurations on end devices.
    
    \example network().getDevice("PC0").getPort("FastEthernet0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setIpSubnetMask

      public void setIpSubnetMask(IPAddress newIpAddress, IPAddress newMask)
      Information provided by the PKI file:
      
          \brief Configures a static IP address and subnet mask on the port.
          
          \param newIpAddress, the IP address.
          \param newMask, the subnet mask.
          
              
      Specified by:
      setIpSubnetMask in interface HostPort
      Parameters:
      newIpAddress - Takes in a parameter of newIpAddress
      newMask - Takes in a parameter of newMask
    • setDefaultArpTimeout

      public void setDefaultArpTimeout()
      Information provided by the PKI file:
      
          \brief Sets the default timer time for ARP.
          
              
      Specified by:
      setDefaultArpTimeout in interface HostPort
    • setDhcpClientFlag

      public void setDhcpClientFlag(boolean bFlag)
      Information provided by the PKI file:
      
          \brief Enables or disables the DHCP client on the port.
          
          \param bFlag, true to enable the DHCP client, false to disable it.
          
              
      Specified by:
      setDhcpClientFlag in interface HostPort
      Parameters:
      bFlag - Takes in a parameter of bFlag
    • isDhcpClientOn

      public boolean isDhcpClientOn()
      Information provided by the PKI file:
      
          \brief Returns true if the DHCP client is enabled, otherwise false.
          
          \return bool, true if the DHCP client is enabled, otherwise false.
          
              
      Specified by:
      isDhcpClientOn in interface HostPort
      Returns:
      boolean Returns a boolean
    • getIpAddress

      public IPAddress getIpAddress()
      Information provided by the PKI file:
      
          \brief Returns the IP address configured on the port.
          
          \return ip, the IP address configured on the port.
          
              
      Specified by:
      getIpAddress in interface HostPort
      Returns:
      IPAddress Returns a IPAddress
    • getSubnetMask

      public IPAddress getSubnetMask()
      Information provided by the PKI file:
      
          \brief Returns the subnet mask configured on the port.
          
          \return ip, the subnet mask configured on the port.
          
              
      Specified by:
      getSubnetMask in interface HostPort
      Returns:
      IPAddress Returns a IPAddress
    • setIpv6Enabled

      public void setIpv6Enabled(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables IPv6 on the port.
          
          \param bEnable, true to enable IPv6, false to disable it.
          
              
      Specified by:
      setIpv6Enabled in interface HostPort
      Parameters:
      bEnable - Takes in a parameter of bEnable
    • isIpv6Enabled

      public boolean isIpv6Enabled()
      Information provided by the PKI file:
      
          \brief Returns true if IPv6 is enabled on the port, otherwise false.
          
          \return bool, true if IPv6 is enabled on the port, otherwise false.
          
              
      Specified by:
      isIpv6Enabled in interface HostPort
      Returns:
      boolean Returns a boolean
    • setIpv6AddressAutoConfig

      public void setIpv6AddressAutoConfig(boolean bAutoConfig)
      Information provided by the PKI file:
      
          \brief Enables or disables IPv6 auto config.
          
          \param bAutoConfig, true to enable IPv6 auto config, false to disable it.
          
              
      Specified by:
      setIpv6AddressAutoConfig in interface HostPort
      Parameters:
      bAutoConfig - Takes in a parameter of bAutoConfig
    • isIpv6AddressAutoConfig

      public boolean isIpv6AddressAutoConfig()
      Information provided by the PKI file:
      
          \brief Returns true if IPv6 auto config is enabled, otherwise false.
          
          \return bool, true if IPv6 auto config is enabled, otherwise false.
          
              
      Specified by:
      isIpv6AddressAutoConfig in interface HostPort
      Returns:
      boolean Returns a boolean
    • isSetToDhcpv6

      public boolean isSetToDhcpv6()
      Information provided by the PKI file:
      
          \brief Returns true if port is set to DHCP v6, otherwise false.
          
          \return bool, true if port is set to DHCP v6, otherwise false.
          
              
      Specified by:
      isSetToDhcpv6 in interface HostPort
      Returns:
      boolean Returns a boolean
    • setIpv6LinkLocal

      public void setIpv6LinkLocal(IPV6Address ipAddress)
      Information provided by the PKI file:
      
          \brief Sets the IPv6 link-local address.
          
          \param ipAddress, the IPv6 link-local address.
          
              
      Specified by:
      setIpv6LinkLocal in interface HostPort
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
    • getIpv6LinkLocal

      public IPV6Address getIpv6LinkLocal()
      Information provided by the PKI file:
      
          \brief Returns the IPv6 link-local address.
          
          \return ipv6, the IPv6 link-local address.
          
              
      Specified by:
      getIpv6LinkLocal in interface HostPort
      Returns:
      IPV6Address Returns a IPV6Address
    • addIpv6Address

      public boolean addIpv6Address(IPV6Address ipAddress, int prefix, IPV6AddressType type, boolean bAllowDup)
      Information provided by the PKI file:
      
          \brief Configures a static IPv6 address and network prefix on the port.
          
          \param ipAddress, the IPv6 address.
          \param prefix, the network prefix.
          \param type,        the IPv6 address type.
          IPv6 address types: eUnicast = 0,
          eAnycast = 1,
          eEui64 = 2,
          eNdAssigned = 3,
          eDhcpAssigned = 4
          \param bAllowDup, true to allow duplicate IPv6 addresses, false to disallow duplicate IPv6 addresses.
          
              
      Specified by:
      addIpv6Address in interface HostPort
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
      prefix - Takes in a parameter of prefix
      type - Takes in a parameter of type
      bAllowDup - Takes in a parameter of bAllowDup
      Returns:
      boolean Returns a boolean
    • removeIpv6Address

      public boolean removeIpv6Address(IPV6Address ipAddress, int prefix, IPV6AddressType type)
      Information provided by the PKI file:
      
          \brief Removes the IPv6 configuration from the port.
          
          \param ipAddress, the IPv6 address.
          \param prefix, the network prefix.
          \param type,        the IPv6 address type.
          IPv6 address types: eUnicast = 0,
          eAnycast = 1,
          eEui64 = 2,
          eNdAssigned = 3,
          eDhcpAssigned = 4
          
              
      Specified by:
      removeIpv6Address in interface HostPort
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
      prefix - Takes in a parameter of prefix
      type - Takes in a parameter of type
      Returns:
      boolean Returns a boolean
    • removeAllIpv6Addresses

      public void removeAllIpv6Addresses()
      Information provided by the PKI file:
      
          \brief Removes all IPv6 address configurations.
          
              
      Specified by:
      removeAllIpv6Addresses in interface HostPort
    • hasIpv6Address

      public boolean hasIpv6Address(IPV6Address ipAddress)
      Information provided by the PKI file:
      
          \brief Returns true if the specified IPv6 address is configured on the port, otherwise false.
          
          \param ipAddress, the IPv6 address of interest.
          
          \return bool, true if the specified IPv6 address is configured on the port, otherwise false.
          
              
      Specified by:
      hasIpv6Address in interface HostPort
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
      Returns:
      boolean Returns a boolean
    • getIpv6Address

      public IPV6AddressConfig getIpv6Address(IPV6Address ipAddress)
      Information provided by the PKI file:
      
          \brief Returns the Ipv6AddressConfig object of the specified IPv6 address.
          
          \param ipAddress, the IPv6 address of interest.
          
          \return Ipv6AddressConfig, the Ipv6AddressConfig object of the specified IPv6 address.
          
              
      Specified by:
      getIpv6Address in interface HostPort
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
      Returns:
      IPV6AddressConfig Returns a IPV6AddressConfig
    • getUnicastIpv6Address

      public IPV6Address getUnicastIpv6Address()
      Information provided by the PKI file:
      
          \brief Returns a list of Ipv6AddressConfig objects associated to the port.
          
          \return vector<Ipv6AddressConfig>, a list of Ipv6AddressConfig objects associated to the port.
          
              
      Specified by:
      getUnicastIpv6Address in interface HostPort
      Returns:
      IPV6Address Returns a IPV6Address
    • getUnicastIpv6Prefix

      public int getUnicastIpv6Prefix()
      Information provided by the PKI file:
      
          \brief Returns the port's Unicast Ipv6 Prefix.
          
          \return int, the port's Unicast Ipv6 Prefix.
          
              
      Specified by:
      getUnicastIpv6Prefix in interface HostPort
      Returns:
      int Returns a int
    • getIpv6Addresses

      public List<IPV6AddressConfig> getIpv6Addresses()
      Information provided by the PKI file:
      
          \brief Returns a list of Ipv6AddressConfig objects associated to the port.
          
          \return vector<Ipv6AddressConfig>, a list of Ipv6AddressConfig objects associated to the port.
          
              
      Specified by:
      getIpv6Addresses in interface HostPort
      Returns:
      List<IPV6AddressConfig> Returns a List<IPV6AddressConfig>
    • isInIpv6Multicast

      public boolean isInIpv6Multicast(IPV6Address ipAddress)
      Information provided by the PKI file:
      
          \brief Returns true if specified IPv6 address is a multicast address, otherwise false.
          
          \param ipAddress, the IPv6 address of interest.
          
          \return bool, true if specified IPv6 address is a multicast address, otherwise false.
          
              
      Specified by:
      isInIpv6Multicast in interface HostPort
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
      Returns:
      boolean Returns a boolean
    • getIpv6Multicast

      public List<IPV6Address> getIpv6Multicast()
      Information provided by the PKI file:
      
          \brief Returns a list of IPv6 multicast addresses configured on the port.
          
          \return vector<ipv6>, a list of IPv6 multicast addresses configured on the port.
          
              
      Specified by:
      getIpv6Multicast in interface HostPort
      Returns:
      List<IPV6Address> Returns a List<IPV6Address>
    • setMtu

      public void setMtu(int mtu)
      Information provided by the PKI file:
      
          \brief Sets the maximum transmission unit (MTU) value on the port.
          
          \param mtu, the MTU value.
          
              
      Specified by:
      setMtu in interface HostPort
      Parameters:
      mtu - Takes in a parameter of mtu
    • getMtu

      public int getMtu()
      Information provided by the PKI file:
      
          \brief Returns the maximum transmission unit (MTU) value configured on the port.
          
          \return int, the MTU value.
          
              
      Specified by:
      getMtu in interface HostPort
      Returns:
      int Returns a int
    • setIpMtu

      public void setIpMtu(int mtu)
      Information provided by the PKI file:
      
          \brief Sets the IP maximum transmission unit (MTU) value on the port.
          
          \param mtu, the IP MTU value.
          
              
      Specified by:
      setIpMtu in interface HostPort
      Parameters:
      mtu - Takes in a parameter of mtu
    • getIpMtu

      public int getIpMtu()
      Information provided by the PKI file:
      
          \brief Returns the IP maximum transmission unit (MTU) value configured on the port.
          
          \return int, the IP MTU value.
          
              
      Specified by:
      getIpMtu in interface HostPort
      Returns:
      int Returns a int
    • setIpv6Mtu

      public void setIpv6Mtu(int mtu)
      Information provided by the PKI file:
      
          \brief Sets the IPv6 maximum transmission unit (MTU) value on the port.
          
          \param mtu, the IP MTU value.
          
              
      Specified by:
      setIpv6Mtu in interface HostPort
      Parameters:
      mtu - Takes in a parameter of mtu
    • getIpv6Mtu

      public int getIpv6Mtu()
      Information provided by the PKI file:
      
          \brief Returns the IPv6 maximum transmission unit (MTU) value configured on the port.
          
          \return int, the IPv6 MTU value.
          
              
      Specified by:
      getIpv6Mtu in interface HostPort
      Returns:
      int Returns a int
    • setDefaultGateway

      public void setDefaultGateway(IPAddress gateway)
      Information provided by the PKI file:
      
          \brief Sets the default gateway for this port.
          
          \param gateway, the IP address of the default gateway.
          
              
      Specified by:
      setDefaultGateway in interface HostPort
      Parameters:
      gateway - Takes in a parameter of gateway
    • setDnsServerIp

      public void setDnsServerIp(IPAddress gateway)
      Information provided by the PKI file:
      
          \brief Sets the DNS server gateway for this port.
          
          \param gateway, the IP address of the DNS gateway.
          
              
      Specified by:
      setDnsServerIp in interface HostPort
      Parameters:
      gateway - Takes in a parameter of gateway
    • setv6ServerIp

      public void setv6ServerIp(IPV6Address gateway)
      Information provided by the PKI file:
      
          \brief Sets the DNS Server IPv6 gateway for this port.
          
          \param gateway, the IPv6 address of the DNS gateway.
          
              
      Specified by:
      setv6ServerIp in interface HostPort
      Parameters:
      gateway - Takes in a parameter of gateway
    • setv6DefaultGateway

      public void setv6DefaultGateway(IPV6Address gateway)
      Information provided by the PKI file:
      
          \brief Sets the default IPv6 gateway for this port.
          
          \param gateway, the IPv6 address of the default gateway.
          
              
      Specified by:
      setv6DefaultGateway in interface HostPort
      Parameters:
      gateway - Takes in a parameter of gateway
    • isInboundFirewallOn

      public boolean isInboundFirewallOn()
      Information provided by the PKI file:
      
          \brief Returns true if the IPv4 inbound firewall is enabled, otherwise false.
          
          \return bool, true if the IPv4 inbound firewall is enabled, otherwise false.
          
              
      Specified by:
      isInboundFirewallOn in interface HostPort
      Returns:
      boolean Returns a boolean
    • setInboundFirewallService

      public void setInboundFirewallService(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables the IPv4 inbound firewall.
          
          \param bEnable, true to enable the IPv4 inbound firewall, false to disable it.
          
              
      Specified by:
      setInboundFirewallService in interface HostPort
      Parameters:
      bEnable - Takes in a parameter of bEnable
    • isInboundIpv6FirewallOn

      public boolean isInboundIpv6FirewallOn()
      Information provided by the PKI file:
      
          \brief Returns true if the IPv6 inbound firewall is enabled, otherwise false.
          
          \return bool, true if the IPv6 inbound firewall is enabled, otherwise false.
          
              
      Specified by:
      isInboundIpv6FirewallOn in interface HostPort
      Returns:
      boolean Returns a boolean
    • setInboundIpv6FirewallService

      public void setInboundIpv6FirewallService(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables the IPv6 inbound firewall.
          
          \param bEnable, true to enable the IPv6 inbound firewall, false to disable it.
          
              
      Specified by:
      setInboundIpv6FirewallService in interface HostPort
      Parameters:
      bEnable - Takes in a parameter of bEnable